﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
   <title>@V5.Config.View["SiteTitle"]</title>
    <meta name="Keywords" content="网络购物，网上超市，网上购物，购物，网上商店，购物商城,购物网，超市网,世博会门票购买" />
    <meta name="Description" content="用鼠标逛超市，不用排队，方便实惠送上门，网上购物新生活。" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="/@V5.Config.TemplatePath/css/index.css"/>
    <script src="/@V5.Config.TemplatePath/javascript/jquery.min.js" type="text/javascript"></script>
    <script src="/@V5.Config.TemplatePath/javascript/Comon.js" type="text/javascript" charset="UTF-8"></script> 
     @RenderPage("includes/tView.cshtml")
    <script>
        menuHide = true; //该值只有在首页才需要配置。其余页面可以忽略
    </script>
    @{
        var user = (V5_Model.ModelGZUser)Session["isLogin"];  
        }
</head>
<body>
    @RenderPage("includes/header.cshtml")
    <div class="wrap_main">
    <div class="wrap clearfix">
        <div style="padding-top: 482px;" class="index_side_l fl">
            <div class="banner_left">
                <a target="_blank" href="">
                    <img src="/@V5.Config.TemplatePath/images/bc8104790f7a5066YY.jpg"></a>
            </div>
            <div class="recommend_left mt">
                <h2> 友情推荐</h2>

                @{
                    DataTable dt12 = new V5_BLL.BLLFriend().GetList(3,"","").Tables[0]; 
                    }

                <div class="clearfix recommend">
                    <span class="pre2"></span><span class="next2"></span>
                    <ul class="tab">
                        @if (dt12 != null && dt12.Rows.Count > 0)
                        {
                            for (int fl = 0; fl < dt12.Rows.Count; fl++)
                            {
                                 <li class="@{
                                if (fl == 0)
                                {
                                    @("cur") 
                                }
                                else if(fl==dt12.Rows.Count)
                                {
                                    @("last")
                                }    
                                     }">@dt12.Rows[fl]["FriendTitle"]<b></b></li>
                            } 
                        }
                    </ul>
                </div>
                 @if (dt12 != null && dt12.Rows.Count > 0)
                {
                    for (int fl = 0; fl < dt12.Rows.Count; fl++)
                    {
                          <a href="@dt12.Rows[fl]["FriendUrl"]" @(fl==0?"style='display: none;'":"") target="_blank" title="@dt12.Rows[fl]["FriendTitle"]">
                            <img alt="@dt12.Rows[fl]["FriendTitle"]" src="@dt12.Rows[fl]["FriendLogo"]">
                          </a>
                    }
                }
               
            </div>
        </div>
        <!--主要banner区 -->
        <div class="index_m_w550 fl ml mt">
            <div id="banner">
             @{
                 DataTable dt = V5.GZProduct.Query_By("*", "and isShow=1", "", 4);
              }
              @if (dt != null && dt.Rows.Count > 0)
              {
                  foreach (DataRow item in dt.Rows)
                  { 
                    <p class="now"><a href="@V5.Url.Action("Product/View", new { ID = item["ID"].ToString() })" target="_blank"><img alt="" src="/@item["PicturePath"]"></a></p>
                  }
                
                <ul>
                    @for (int i = 1; i <= dt.Rows.Count; i++)
                    {
                        <li @(i == 1 ? "class=now" : "")>@i</li>
                    } 
                </ul>
                  
              }
            </div> 
            <!--促销精选-->
            <div class="sales_promotion_out mt">
                <h2>
                    促销精选</h2>
                <!--滚动产品信息 -->
                <div class="sales_promotion_marquee">
                    <em><a href="javascript:rollText(-1);" class="prev">上一页</a></em><em><a href="javascript:rollText(+1);"
                        class="next">下一页</a></em>
                    <div id="salesMarquee" class="con">
                        <ul class="rollTextMenus" style="width: 9450px;">
                             @{
                                 DataTable dt2 = V5.GZProduct.Query_By("*", "and Disable=1", "", 4);
                            }
                                @if (dt2 != null && dt2.Rows.Count > 0)
                                {
                                    int k = 1;
                                    foreach (DataRow item in dt2.Rows)
                                    {  
                                        <li id="rollTextMenu@(k)" @(k > 1 ? "style='display: none'" : "")> <a target="_blank" href="@V5.Url.Action("Product/View", new { ID = item["ID"].ToString() })" title="@item["ProductName"]">@item["ProductName"]</a> </li>
                                        k++;
                                    }
                                }
                           
                        </ul>
                    </div>
                </div>
                <div class="sales_promotion mt5">
                    <span class="arrow prev">上一页</span>
                    <div class="con">
                        <ul style="width: 2800px;">
                           @{
                               DataTable dt3 = V5.GZProduct.Query_By("*", "and Disable=1 and isShow=1", "", 10);
                            }
                            @if (dt3 != null && dt3.Rows.Count > 0)
                            {
                                int kk = 1;
                                bool bfl = false;
                                @("<li> ")
                                
                                foreach (DataRow item in dt3.Rows)
                                { 
                                    <span><a href="@V5.Url.Action("Product/View", new { ID = item["ID"].ToString() })" target="_blank" title=""> <img alt="" src="/@item["PicturePath"]"> </a></span>
                                    if (kk % 5 == 0)
                                    {
                                        bfl = true;
                                        @("</li><li> ")
                                    }
                                    kk++;
                                }
                                if (!bfl || dt3.Rows.Count < 5 || dt3.Rows.Count % 5 != 0)
                                {
                                 @("</li> ")
                                }
                            } 
                              
                        </ul>
                         
                    </div>
                    <span class="arrow next">下一页</span>
                </div>
            </div>
            <!--新品上市-->
            <div class="new_pr_out mt">
                <h2> 新品上市</h2>
                      @{
                          DataTable dt8 = V5.GZProduct.Query_By("*", "", " CreateDate DESC", 20);
                          int ni = 1;
                          int nk = 0;
                        } 
                <ul class="num">
                    @if (dt8 != null && dt8.Rows.Count > 0)
                    {
                        int nPage = (int)Math.Ceiling(double.Parse(dt8.Rows.Count.ToString()) / 5);

                        for (int s = 1; s <= nPage; s++)
                        {
                             <li @(s == 1 ? "class=on" : "")>@s</li>
                        }
                    } 
                </ul>
                <div class="new_pr mt5">
                    <ul class="show">
                      
                       @if (dt8 != null && dt8.Rows.Count > 0) {
                           foreach (DataRow dr in dt8.Rows) {
                                <li><a href="@V5.Url.Action("Product/View", new { ID = dr["ID"].ToString() })" title="" target="_blank">
                                    <img src="/@dr["PicturePath"]"></a> <span>
                                        <a href="@V5.Url.Action("Product/View", new { ID = dr["ID"].ToString() })" title="@dr["ProductName"]" style="height:46px;overflow:hidden" target="_blank">@dr["ProductName"]</a></span><em>￥@dr["MaxSalePrice"]</em> </li>
                           
                               if (ni % 5 == 0) {
                                   nk++;
                                    @Html.Raw("</ul><ul>")
                               }
                               ni++;
                           }

                           if (ni < 5 || ni / 5 != nk) {
                                 @Html.Raw("</ul>")
                           }

                       }
                       else {
                            @Html.Raw("</ul>")
                       }
                </div>
            </div>
        </div>
        <!--一屏右侧 -->
        <div class="index_side_r fr mt">
            <div class="announcement">
                <ul class="tab">
                    <li class="cur">公告</li>
                    <li class="air">新闻</li>
                </ul>
                <ul id="announcement">
                    @foreach (DataRow dr in V5.Article.Query_By("*", " and ClassID=1", " AddDateTime desc", 5).Rows)
                    {
                        <li class="color_gary"><a href="@V5.Url.Action("News/View", new { ID = dr["ID"].ToString() })" title="@dr["Title"]" target="_blank">@V5.Tool.CutString(dr["Title"].ToString(), 30, "") </a>
                    </li>
                    }
                   @* <li class="more"><a href="@V5.Url.Action("News/List", new { ClassID = "1", PageID = "1" })" target="_blank">更多</a> </li>*@
                </ul>
                <ul id="news">
                     @foreach (DataRow dr in V5.Article.Query_By("*", " and ClassID=2", " AddDateTime desc", 5).Rows)
                     {
                       <li class="color_gary"><a href="@V5.Url.Action("News/View", new { ID = dr["ID"].ToString() })" title="@dr["Title"]" target="_blank">@V5.Tool.CutString(dr["Title"].ToString(), 30, "") </a>
                    </li>
                     }
                    <li class="more"><a href="@V5.Url.Action("News/List", new { ClassID = "1", PageID = "1" })" target="_blank">更多</a> </li>
                </ul>
            </div>
            <div class="oneday_twostyle mt">
                <a target="_blank" href="">
                    <img src="/@V5.Config.TemplatePath/images/c1485330ea49c828YY.jpg">
                </a>
            </div>
        </div>
    </div>
    <!--中间横幅广告 start-->
    @V5.Html.Partial("includes/indexPoster")
    <!--中间横幅广告 end-->
    <!--品牌馆 start -->
    <div class="index_item_sort wrap mt clearfix">
        <p class="more_link">
            <!-- 分类关键词 -->
            @{
                DataTable dt6 = new V5_EShop._Class.BLL.BLLGZBrand().GetList(5, "", "").Tables[0]; 
            }

            @if (dt6 != null && dt6.Rows.Count > 0)
            {
                foreach (DataRow item in dt6.Rows)
                {
                     <a href="" target="_blank" title="">@item["BrandName"]</a>
                }
            }
            
           @* <a target="_blank" class="enter" href="#">进入频道</a>*@
        </p>
        <h2> <a href="" target="_blank">品牌馆</a></h2>

        @{
            DataTable dt4 = V5.GZProduct.Query_By("*", " and BrandID<>'00000000-0000-0000-0000-000000000000'", " CreateDate desc", 1);
            DataTable dt5 = V5.GZProduct.Query_By("*", " and BrandID<>'00000000-0000-0000-0000-000000000000'", "", 5);
            }

       @if (dt4 != null && dt4.Rows.Count > 0)
       {
            <a class="index_item_sort_bigpic mt" href="@V5.Url.Action("Product/View", new { ID = dt.Rows[0]["ID"].ToString() })" target="_blank">
                <img src="/@dt.Rows[0]["PicturePath"]">
            </a>
       }
        <ul class="pr_list">
            @if (dt5 != null && dt5.Rows.Count > 0)
            {
                foreach (DataRow item in dt5.Rows)
                {
                    var PModel =  new V5_EShop._Class.BLL.BLLGZProduct().GetModel(System.Guid.Parse(item["ID"]+string.Empty));
                    decimal prices = new V5_EShop._Class.BLL.BLLGZProduct().GetPrice(user, PModel);
                    
                    <li><a href="@V5.Url.Action("Product/View", new { ID = item["ID"].ToString() })" target="_blank">
                        <img src="/@item["PicturePath"]">
                        <span>@item["ProductName"]</span> </a>
                        <span><strong>￥@item["MaxSalePrice"]</strong></span>
                    </li>
                }
            }
        </ul>
        <div class="small_banner fr"> 
           @{
               DataTable dt7 = V5.GZProduct.Query_By("*", " and IntegralSign=1", "", 3);
            }
            @if (dt7 != null && dt7.Rows.Count > 0)
            {
                <a class="index_item_sort_bigpic mt" href="@V5.Url.Action("Product/View", new { ID = dt.Rows[0]["ID"].ToString() })" target="_blank">
                    <img src="/@dt.Rows[0]["PicturePath"]">
                </a>
            }
        </div>
    </div>
    <!--品牌馆 end -->
    <!--中间横幅广告 start-->
     @V5.Html.Partial("includes/indexPoster")
    <!--中间横幅广告 end-->
    <!--品牌馆 start -->
    <div class="index_item_sort wrap mt clearfix">
        <p class="more_link">
            <!-- 分类关键词 -->
            <a href="" target="_blank" title="">雀巢咖啡 </a><a href="" target="_blank" title="">雀巢咖啡
            </a><a href="" target="_blank" title="">雀巢咖啡 </a><a href="" target="_blank" title="">
                雀巢咖啡 </a><a href="" target="_blank" title="">雀巢咖啡 </a><a target="_blank" class="enter"
                    href="#">进入频道</a>
        </p>
        <h2><a href="" target="_blank">热卖商品</a></h2>
         @{
             DataTable dt9 = V5.GZProduct.Query_By("*", " and DirectMarketing=1", " CreateDate desc", 1);
             DataTable dt10 = V5.GZProduct.Query_By("*", " and DirectMarketing=1", "", 5);
            }

       @if (dt9 != null && dt9.Rows.Count > 0)
       {
            <a class="index_item_sort_bigpic mt" href="@V5.Url.Action("Product/View", new { ID = dt.Rows[0]["ID"].ToString() })" target="_blank">
                <img src="/@dt.Rows[0]["PicturePath"]">
            </a>
       }
        <ul class="pr_list">
            @if (dt10 != null && dt10.Rows.Count > 0)
            {
                foreach (DataRow item in dt10.Rows)
                {
                    <li><a href="@V5.Url.Action("Product/View", new { ID = item["ID"].ToString() })" target="_blank">
                        <img src="/@item["PicturePath"]">
                        <span>@item["ProductName"]</span> </a>
                        <span> <strong>￥@item["MaxSalePrice"]</strong></span>
                    </li>
                }
            }
        </ul>
        <div class="small_banner fr"> 
           @{
               DataTable dt11 = V5.GZProduct.Query_By("*", " and DirectMarketing=1 and IntegralSign=1", "", 3);
            }
            @if (dt11 != null && dt11.Rows.Count > 0)
            {
                <a class="index_item_sort_bigpic mt" href="@V5.Url.Action("Product/View", new { ID = dt.Rows[0]["ID"].ToString() })" target="_blank">
                    <img src="/@dt.Rows[0]["PicturePath"]">
                </a>
            } 
            
        </div>
    </div>
    <!--品牌馆 end -->
    <!-- 品牌旗舰店 -->
    
   
    </div>
     @RenderPage("includes/Footer.cshtml") 
    <!--回顶部 -->
    <div class="fixedRight" id="addmyplan">
        <a href="#" target="_blank"><span>用户反馈</span></a>
        <div class="toTop">
            <a href="javascript:void(0);">回到顶部</a></div>
    </div>
    <script>


        $(function () {
            RollTextMenuInit(); 
            announcement(); 
            g("sales_promotion");
            f("new_pr_out");
            e();
        });

      

    </script>
    
    <script type="text/javascript" src="/@V5.Config.TemplatePath/javascript/banner.js"></script> 
</body>
</html>
